
#ifndef __BUFFER_H_
#define __BUFFER_H_

#include <time.h>
#include "Pagina.h"

typedef struct {
	Pagina pagina;
} BufferPosition;

extern BufferPosition buf_data[CAPACIDADE_DO_BUFFER];
extern int taxa_acerto;
extern int count_LRU;
extern int count_SCMBP;
extern int count_temp_leitura;
extern int count_temp_escrita;
extern int count_SCMBP_dirty;
extern clock_t tempo;

void    CriarBuffer();

void	MostrarBuffer();
Pagina* buff_LerPagina(int offset);
void    buff_EscreverPagina(Pagina* p);
void 	buff_AlterarPagina(int offset);

void    ApagarBuffer();

#endif
